package pri.syl.xiaowu.websocket.init.core.factory;


import pri.syl.xiaowu.websocket.core.container.WebsocketRouteContainer;
import pri.syl.xiaowu.websocket.core.template.WebsocketRouteTemplate;
import pri.syl.xiaowu.websocket.core.template.core.factory.WebsocketRouteTemplateFactory;

/**
 * @Author YunLong
 * @Date 2021/7/18 18:45
 * @Description 路由工厂，添加websockerTemplate到容器中
 **/
public class WebsocketRouteInitFactory {
    private WebsocketRouteInitFactory() {
    }

    public static void addWebsocketRouteTemplate(WebsocketRouteTemplate routeTemplate) {
        String route = WebsocketRouteTemplateFactory.getRoute(routeTemplate);
        WebsocketRouteContainer.putWebsocketRouteTemplate(route, routeTemplate);
    }
}
